package com.chenyi.system.service.impl;

import com.chenyi.system.domain.SysAdverPosition;
import com.chenyi.system.mapper.SysAdverPositionMapper;
import com.chenyi.system.service.ISysAdverPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 广告位置Service业务层处理
 * 
 * @author qinggeng
 * @date 2020-02-12
 */
@Service
public class SysAdverPositionServiceImpl implements ISysAdverPositionService
{
    @Autowired
    private SysAdverPositionMapper adverPositionMapper;

    /**
     * 查询广告位置
     * 
     * @param positionId 广告位置ID
     * @return 广告位置
     */
    @Override
    public SysAdverPosition selectSysAdverPositionById(Long positionId)
    {
        return adverPositionMapper.selectSysAdverPositionById(positionId);
    }

    /**
     * 查询广告位置列表
     * 
     * @param sysAdverPosition 广告位置
     * @return 广告位置
     */
    @Override
    public List<SysAdverPosition> selectSysAdverPositionList(SysAdverPosition sysAdverPosition)
    {
        return adverPositionMapper.selectSysAdverPositionList(sysAdverPosition);
    }

    /**
     * 新增广告位置
     * 
     * @param sysAdverPosition 广告位置
     * @return 结果
     */
    @Override
    public int insertSysAdverPosition(SysAdverPosition sysAdverPosition)
    {
        return adverPositionMapper.insertSysAdverPosition(sysAdverPosition);
    }

    /**
     * 修改广告位置
     * 
     * @param sysAdverPosition 广告位置
     * @return 结果
     */
    @Override
    public int updateSysAdverPosition(SysAdverPosition sysAdverPosition)
    {
        return adverPositionMapper.updateSysAdverPosition(sysAdverPosition);
    }

    /**
     * 批量删除广告位置
     * 
     * @param positionIds 需要删除的广告位置ID
     * @return 结果
     */
    @Override
    public int deleteSysAdverPositionByIds(Long[] positionIds)
    {
        return adverPositionMapper.deleteSysAdverPositionByIds(positionIds);
    }

    /**
     * 删除广告位置信息
     * 
     * @param positionId 广告位置ID
     * @return 结果
     */
    @Override
    public int deleteSysAdverPositionById(Long positionId)
    {
        return adverPositionMapper.deleteSysAdverPositionById(positionId);
    }
}
